package com.kd.service.jobSeeker.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.kd.bean.jobSeeker.My_news;
import com.kd.dao.jobSeeker.IMy_newsDao;
import com.kd.service.jobSeeker.IMy_newsService;

@Service
@Transactional
public class My_newsServiceImpl implements IMy_newsService{
	
	@Autowired
	private IMy_newsDao newDao;

	@Override
	public PageInfo<My_news> queryAllNews_visit_stateMy_news(Integer pageNum, Integer pageSize,Integer recruiter_id) throws Exception {
		PageHelper.startPage(pageNum, pageSize);
		List<My_news> list = newDao.queryAllNews_visit_stateMy_news(recruiter_id);
		PageInfo<My_news> info = new PageInfo<>(list);
		return info;
	}

	@Override
	public Boolean updateNews_visit_state(Integer news_id, Integer news_visit_state) throws Exception {
		
		return newDao.updateNews_visit_state(news_id, news_visit_state)>0;
	}

}
